﻿using System;
using Volo.Abp.Domain.Entities;

namespace Zt.QmtqDemo.ConfmPlan
{
    public class ConformPlanItem : Entity
    {
        public Guid ConfmPlanId { get; set; }

        /// <summary>
        /// 准发计划号
        /// </summary>
        public string ConfmPlanNo { get; set; }

        /// <summary>
        /// 材料号
        /// </summary>
        public string MatNo { get; set; }

        /// <summary>
        /// 材料厚度
        /// </summary>
        public decimal MatThick { get; set; }

        /// <summary>
        /// 材料宽度
        /// </summary>
        public decimal MatWidth { get; set; }

        /// <summary>
        /// 材料长度
        /// </summary>
        public decimal MatLen { get; set; }

        /// <summary>
        /// 材料实际重量
        /// </summary>
        public decimal MatWt { get; set; }

        public virtual bool Equals(Guid conformPlanId, string matNo)
        {
            return ConfmPlanId == conformPlanId && MatNo == matNo;
        }

        protected ConformPlanItem()
        {

        }

        public ConformPlanItem(Guid conformPlanId,string conformPlanNo, string matNo,
            decimal matThick, decimal matWidth, decimal matLen, decimal matwt)
        {
            ConfmPlanId = conformPlanId;
            ConfmPlanNo = conformPlanNo;
            MatNo = matNo;
            MatThick = matThick;
            MatWidth = matWidth;
            MatLen = matLen;
            MatWt = matwt;
        }

        public override object[] GetKeys()
        {
            return new object[] { ConfmPlanId, MatNo };
        }
    }
}
